#ifndef EDITPATIENTINFO_H
#define EDITPATIENTINFO_H

#include <QWidget>
#include <QTcpSocket>
#include <QLineEdit>
#include <QPushButton>

class EditPatientInfo : public QWidget {
    Q_OBJECT

public:
    explicit EditPatientInfo(QTcpSocket *socket, QWidget *parent = nullptr);

private slots:
    void onSaveButtonClicked();
    void onBackButtonClicked();

private:
    void setInputFieldStyle(QLineEdit *lineEdit);  // 声明 setInputFieldStyle 函数
    QPushButton* createStyledButton(const QString &text, const QString &color);  // 声明 createStyledButton 函数

    QTcpSocket *tcpSocket;
    QLineEdit *idEdit;
    QLineEdit *nameEdit;
    QLineEdit *sexEdit;
    QLineEdit *ageEdit;
    QLineEdit *phoneEdit;
    QLineEdit *addressEdit;
    QLineEdit *passwardEdit;
};

#endif // EDITPATIENTINFO_H
